﻿<script setup lang="ts" name="IconSelect">
import useScrollPosition from '@/hooks/scrollPosition'
import { storeToRefs } from 'pinia'
import { useSystemConfigStore } from '@/store/storage/systemConfigStore'
const route = useRoute()

const systemConfigStore = useSystemConfigStore()
const { systemConfig } = storeToRefs(systemConfigStore)

// 滚动行为
useScrollPosition(route)

const value = ref('ri:account-pin-circle-line')
</script>

<template>
  <el-space :size="systemConfig.space" fill direction="vertical">
    <el-card shadow="never" class="no-border no-radius">
      <el-alert title="图标选择器演示。" type="success" :closable="false" show-icon />
      <IconSelect v-model:icon="value"></IconSelect>
    </el-card>
  </el-space>
</template>

<style scoped lang="scss">
.el-space {
  width: 100%;
  padding: var(--el-space) var(--el-space) 0;
}

.no-border {
  border: none;
}

.no-radius {
  border-radius: 0;
}

.el-alert {
  margin-bottom: var(--el-space);
}

.el-card {
  display: flex;
  flex-direction: column;
  overflow: inherit;

  :deep(.el-card__header) {
    .card-header {
      display: flex;
      align-items: center;
      justify-content: space-between;

    }
  }

  :deep(.el-card__body) {
    flex: 1;
  }
}
</style>
